<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:68:"/webroot/love/public/../application/index/view/index/serachInfo.html";i:1588142480;s:51:"/webroot/love/application/index/view/comm/head.html";i:1588142480;s:53:"/webroot/love/application/index/view/comm/footer.html";i:1588142480;}*/ ?>
<!--
 * @Description: 
 * @version: 2.0Pro
 * @Author: 锐韵网络(Rhyme Natwork)
 * @Date: 2019-02-06 14:31:30
 * @Website: https://521wall.cn
 * @Email: 1697779290@qq.com Or wy-hai@qq.com
 -->
<!DOCTYPE html>
<html>
	<head>
	    <title><?php echo $data['system']['title']; ?></title>
	    <meta charset="utf-8"/>
	    <meta name="description" content="<?php echo $data['system']['description']; ?>"/>
	    <meta name="keywords" content="<?php echo $data['system']['keywords']; ?>"/>
	    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
	    <!-- IE 8浏览器的页面渲染方式 -->
	    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
	    <!-- 默认使用极速内核：针对国内浏览器产商 -->
	    <meta name="renderer" content="webkit">
	    <!-- Chrome Android 地址栏颜色 -->
	    <meta name="theme-color" content="#F596AA" />
	    <!-- ICO文件 -->
	    <link rel="shortcut icon" href="/static/favicon.ico" />
	    <!-- 本地css静态资源 -->
	    <link rel="stylesheet" href="/static/layui/css/layui.css" />
	    <link rel="stylesheet" href="/static/css/app.css" />
	    <link rel="stylesheet" href="/static/css/i.css" />
	    <link rel="stylesheet" href="/static/css/font.css" />
	    <link rel="stylesheet" href="/static/css/style.css" />
	    <!-- 第三方CDN加载fontawesome字体图标CSS -->
	    <link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.css" />
	</head>
<body>
<div id="header">
	<!-- 天气 -->
	<div class="header">
		<div class="heart"></div>
		<div class="header-weather">
			<div id="temp1">loding...</div>
			<img id="weather-ico">
		</div>
		<div class="beat beat-1"></div>
		<div class="beat beat-2"></div>
	</div>
	<!-- 水波特效 -->
	<div class="lovewall_watertiv">
    	<div class="lovewall_water_1"></div>
        <div class="lovewall_water_2"></div>
    </div>
	<!-- 一言 -->
	<center>
	<p id="hitokoto">
		:D 获取中···
	</p>
	</center>
	<script src="https://api.kres.cn/hitokoto?encode=js"></script>
	<div class="menu">
		<div class="container">
			<nav>
				<a href="/" class="">首页</a>
    			<a href="<?php echo url('index/openschool'); ?>" class="">开通</a>
    			<a href="<?php echo url('index/serachInfo'); ?>" class="active">搜索</a>
    			<a href="<?php echo url('index/about'); ?>" class="">关于</a>
			</nav>
		</div>
	</div>
</div>
<div id="content">
<div style="padding:10px">
  <div class="layui-collapse" lay-accordion>
    <div class="layui-card">
      <div class="layui-card-header">提交搜索</div>
      <div class="layui-card-body">
          <blockquote class="layui-elem-quote">在此检索全站内容</blockquote>
        <form class="layui-form" action="">
            <div class="layui-form-item">
                <label class="layui-form-label">搜索类型</label>
                <div class="layui-input-block">
                  <input type="radio" name="type" value="qq" title="qq" lay-filter='type'>
                  <input type="radio" name="type" value="text" title="内容" lay-filter='type' checked>
                </div>
              </div>
          <div class="layui-form-item">
              <label class="layui-form-label">输入框</label>
              <div class="layui-input-block">   
            <input type="text" name="content" required  lay-verify="required" placeholder="输入内容" autocomplete="off" class="layui-input">
          </div>
          </div>
          <div class="layui-form-item">
            <div class="layui-input-block">
              <button class="layui-btn" lay-submit lay-filter="subSerach">立即提交</button>
              <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
          </div>
        </form>
      </div>
    </div>
    <div class="layui-collapse" lay-accordion>
      <div class="layui-card">
        <div class="layui-card-header">搜索结果</div>
        <div style="padding:10px">
            <div class="layui-card-body return-data" ></div>
          </div>
      </div>
    </div>
</div>

<br />
	<div class="copyright container">
		&copy; <?php echo date("Y",\think\Request::instance()->time()); ?> 
		<a href="/"><?php echo $data['system']['name']; ?></a>&nbsp;
		<a href="http://beian.miit.gov.cn" target="_blank"><?php echo $data['system']['icp']; ?></a>&nbsp;
		<?php echo $data['system']['cnzz']; ?>
	</div>
</div>
	<!-- 本地js静态资源 -->
    <script src="/static/layui/layui.js"></script>
	<!-- 全站第三方CDN加载JS -->
	<script src="//cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
	<!-- Cookie储存 -->
	<script src="//cdn.bootcss.com/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
	<!-- ip获取 -->
	<script src="//pv.sohu.com/cityjson?ie=utf-8"></script>
	<!-- 即时预加载 -->
    <script src="//instant.page/2.0.0" type="module" integrity="sha384-D7B5eODAUd397+f4zNFAVlnDNDtO1ppV8rPnfygILQXhqu3cUndgHvlcJR2Bhig8"></script>
    <!-- Public -->
    <script>
	
		document.getElementById("#index").click();
	
	
	
    	console.log(`%c Info: %c`, `background:#ffc7c7; color: #fff; font-weight: bold`,'','感谢您信任我们并使用我们的程序');
    	console.log(`%c Demo: %c`, `background:#ffc7c7; color: #fff; font-weight: bold`,'','官方521wall.cn Wiki文档wiki.521wall.cn');
    	console.log(`%c problem: %c`, `background:#ffc7c7; color: #fff; font-weight: bold`,'','遇到问题请加群731468605');
		layui.use('element', function(){
			var element = layui.element;
		});
		//天气
		$.ajax({
			type: 'GET',
			url: 'https://www.tianqiapi.com/api/',
			data: 'version=v1&appid=66414149&appsecret=11AkDKo9',
			dataType: 'JSON',
			error: function () {
				alert('网络错误');
			},
			success: function (res) {
				uptime = res.update_time.substring(11);
				uptime = uptime.substring(0,uptime.length-3);
				$("#temp1").html(res.data[0].tem);
				$('#weather-ico').attr('src','/static/img/weather/'+res.data[0].wea_img+".png");
			}
		});
		//爱心
		var ismobile="<?php echo $data['ismobile']; ?>";
		if(ismobile==0){
    		(()=>{let 
    	 	h=42;
        	let d=(n)=>Math.floor(Math.random()*n);
        	let k=(c)=>{let s=document.createElement('style');
        	if(!!(window.attachEvent && !window.opera)){
            	s.styleSheet.cssText=c;
    	}else{
            	s.appendChild(document.createTextNode(c));
        	}
        	document.getElementsByTagName('head')[0].appendChild(s);
    	};
    	k('@keyframes u{0%{transform:rotate(0deg);}25%{transform:rotate(10deg);}50%{transform:rotate(0deg);}75%{transform:rotate(-10deg);}100%{transform:rotate(0deg);}};');
    	k('@keyframes m{0%{margin-top:2vh;opacity:0;}20%{opacity:1.0;margin-top:0vh;margin-left:0vw;transform:rotate('+d(90)+'deg);}100%{opacity:0.4;margin-top:100vh;margin-left:'+d(4)+'vw;transform:rotate(1080deg);}};');
    	let w=document.createElement('div');
    	w.id='daWorld';
    	w.style='animation:u 60s ease-in infinite;position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;';
    	document.body.appendChild(w);
    	while(h--){
        	let o=document.createElement('div');
        	o.style=`pointer-events:none;opacity:0;animation:m ${d(14)+6}s ease-in ${d(4000)}ms infinite;z-index:1000;position:fixed;top:${d(40)}vh;left:${d(100)}vw;font-size:${d(40)+20}px;color:${['#d00','#e66','#fcc'][d(3)]};`;
        	o.innerHTML=['♡','♥'][d(2)];w.appendChild(o);
        	}})()
    	}
	</script>
	<!-- index -->
	<script>
		layui.use(['layer', 'form'], function(){
			var layer = layui.layer
			,form = layui.form;
		});
		var notice=$.cookie('notice');
		getNotice();
		function getNotice(){
			$.post("<?php echo url('index/getNotice'); ?>",{func:'get'},function(data){
	        	if(data.code==1){
					if($.cookie('notice_id')!=data.tid){
						var notice_tpis=layer.confirm(data.info, {
							btn: ['我知道了','取消'] //按钮
							}, function(){
								$.cookie('notice_id',data.tid,{ expires: 7 });
								layer.close(notice_tpis);
							}, function(){
								//取消
								layer.close(notice_tpis);
						});
					}
				}else{
					return '获取失败';
				}
	        },'JSON');
	    }
		$('.avatars').click(function(){
			var zid=this.id;
			var sub_id=zid.substring(5,41);
	      	var name=zid.substr(41,100);
			layer.open({
				title:'Tips',
				content:'即将进入<br/>'+name,
				btn:['GO!'],
				yes:function(index){
					location.href="//"+window.location.host+"/"+"index.php/index/school/indexpage/zid/"+sub_id;
					layer.close(index);
				}
			})
		});
		$('.likecall').click(function(){
			var id=this.id;
			var sub_id=id.substring(5,9);
			var dzan = $(this);
			$.get("<?php echo url('index/likeSubmit'); ?>",{
				id:id,
			},function(data){
				if (data.status=='1') {
					layer.msg(data.info,{icon:1});
					$('#'+id).attr('class','likecall fa fa-thumbs-up');	
					dzan.parent().find('#likenums').text(data.count);
				}else{
					layer.msg(data.info,{icon:2});
				}
			},'json');
		})
		$('.comments').click(function() {
			var id=this.id;
	      	var ids=id.substr(5,9);
	       	window.location.href="./article?id="+ids;
		});
	</script>
	<!-- Open -->
	<script>
        layui.use(['form','upload'], function(){
          var form = layui.form;
          //监听提交
          var upload = layui.upload;
        //执行实例
          var uploadInst = upload.render({
            elem: '#img1' //绑定元素
            //,field:'image'
            ,url: "<?php echo url('index/upload'); ?>" //上传接口
            ,accept:'images'  // 允许上传的文件类型
            ,auto:true // 自动上传
            ,before:function(obj){
              layer.msg('上传中',{icon:16});
            }
            ,done: function(res){
              //上传完毕回调
              layer.msg('上传完成');
              $('#file1').val(res.data.src);
            }
            ,error: function(){
              //请求异常回调
              layer.msg('上传异常');
            }
          });
          form.on('submit(formDemo)', function(data){
          //layer.msg(JSON.stringify(data.field));
          layer.msg('提交中', {
            icon: 16
            ,shade: 0.01
          });
          $.ajax({
            url:"<?php echo url('index/openSchool'); ?>"
            ,data:{data:JSON.stringify(data.field)}
            ,type:'post'
            ,dataType:'json'
            ,success:function(res){
              if(res.code=="1"){
              layer.msg('提交成功！请等待审核结果',{icon:1},function(index){
                  location.href="/";
                });
              }
            }
            ,error:function(){
              layer.msg('网络错误');
            }
          })
          return false;
        });
      });
    </script>
    <!-- Info -->
    <script>
		layui.use(['element','form'], function(){
			var element = layui.element
			,form=layui.form; 
			form.on('submit(subSerach)',function(data){
		    	$.ajax({
		    		url:''
		    		,type:'GET'
		    		,dataType:'JSON'
		    		,data:{data:JSON.stringify(data.field)}
		    		,success:function(res){
		        		if(res.code==1){
		        			$('.return-data').after(res.data);
		        		}
		    		}
		    		,error:function(){
		        		layer.msg('请求失败');
		    		}
		    	})
				return false;
			})
		});
		layui.use('util', function(){
			var util = layui.util;
			util.fixbar({
				bgcolor:'#F4A7B9'
				,click: function(type){
					console.log(type);
				}
			});
		});
	</script>

</body>
</html>
